//disini
//By Alif Fajar Setianto
//special for alieps.blogdetik.com
//all right reserved 2011
$(document).unbind('ready',semuajs).bind('ready',semuajs);
setwpcaption();
function semuajs(){
//script dimulai disini
//menghapus navigasi atas
$('[id|="wp-admin-bar"],[id|="google_ads"]').remove();
//menambahkan bgblakang
var bgbl = '<div id="bgblakang"><div id="bg1"></div><div id="bg2"></div><div id="bg3"></div></div>';
$('body').prepend(bgbl);
//menambahkan pengarang
var desainer = 'Desain oleh Alif Fajar Setianto for alieps.blogdetik.com · Supported by inilooh.web.id · ';
  $('#footer p').prepend('<a hreff="http://alieps.blogdetik.com">'+desainer+'</a>');
//menambah nama n tanda tangan
  var tandatangan = '<img style=" position: fixed; bottom: 100px ; left:50px; z-index: 100; " src="http://widget-blogdetik.googlecode.com/svn/img/alieps.png"/>';
  var td2 = '<img style=" position: absolute; bottom: 15px ; left:20px;" src="http://widget-blogdetik.googlecode.com/svn/img/td2.png" />';
$('body').prepend(tandatangan);
$('.postentry').after(td2);
//lebar dan panjang bg
function ukuranbgblakang(){
var lebarhalaman = $(window).height();
var panjanghalaman = $(window).width();
$('#bgblakang div').css({'width':panjanghalaman,'height':lebarhalaman});
};
ukuranbgblakang();
$(window).resize(ukuranbgblakang);
//background keren abis
gantibg2();
function gantibg2(){
$('#bg3').delay(10000).animate({'color':'#fff'},0,function(){
	$(this).fadeOut(800);
	$('#bg2').fadeIn(500).delay(10000).animate({'color':'#fff'},0,function(){
		$(this).fadeOut(800);
		$('#bg1').fadeIn(500).delay(10000).animate({'color':'#fff'},0,function(){
			$(this).fadeOut(800);
			$('#bg3').fadeIn(500).animate({'color':'#fff'},0,gantibg2);
			});
		});
	});
}
//set wrapper utama
$('#content,#sidebar').wrapAll('<div id="utama"/>');

//setting css
$("style:contains('http://alieps.blogdetik.com/wp-content/themes/almost-spring/style.css')").remove();

$("link[href|='my.css']").remove();
$('.postentry fieldset').removeAttr('style');
$('.comment-childs').css({'background-color':'rgba(255,255,255,0.9)','border':'none','padding':5,'border-radius':7});
  $('.chalt').css({'background-color':'rgba(226,226,226,0.9)','border':'none','padding':7,'border-radius':5});
var sumbercss = 'http://widget-blogdetik.googlecode.com/svn/source/style-alieps.css';
$('<link rel="stylesheet" type="text/css" href="'+sumbercss+'" >').prependTo("head");
//blok text di dalam blokquot
  $('blockquote').focus(function(){$(this).select()});
//memasukan topnav

//selesai
};

function setwpcaption(){
//pengaturan ukuran gambar
var banyakimg = $('.wp-caption img').size();

  $('.wp-caption img').css({'width':'auto','max-width':512});
  $('.wp-caption').css({'width':'auto'});
for(var n=0 ; n < banyakimg ;n++){
  var pimg = $('.wp-caption img:eq('+n+')').width();
  $('.wp-caption:eq('+n+')').width(pimg);
  var wimg = $('.wp-caption:eq('+n+')').width();
  //$('#header').prepend('<p>ke:'+n+'. banyak gambar:'+banyakimg+' lebar gambar:'+pimg+'</p>');
}};
